<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="common_css :: commonHeader('机构管理')"></head>
<body class="easyui-layout">
<div style="width: 100%" data-options="region:'west',split:true,border:true,title:'机构树'">
    <div style="margin-left: 50px;">
        <input id="ss" class="easyui-searchbox" style="width:200px"
               data-options="prompt:'搜 索'"/>
        <ul id="treeContent" class="easyui-tree"></ul>
        <div id="nav" class="easyui-menu" style="width:120px;">
            <shiro:hasPermission name="system:organization:add">
                <div id="2" data-options="iconCls:'icon-add'">添加</div>
            </shiro:hasPermission>
            <shiro:hasPermission name="system:organization:edit">
                <div id="3" data-options="iconCls:'icon-edit'">修改</div>
            </shiro:hasPermission>
            <shiro:hasPermission name="system:organization:del">
                <div id="4" data-options="iconCls:'icon-cancel'">移除</div>
            </shiro:hasPermission>
        </div>
    </div>
    <div style="margin-left: 5px;bottom: 10px;position: fixed">
        <shiro:hasPermission name="system:organization:readExcel">
            <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-save"
               onclick="readXls.click()">机构文件上传</a>
        </shiro:hasPermission>
    </div>
</div>
<div id="dlg" class="easyui-dialog" style="width:650px;height:400px"
     closed="true" modal="true" maximizable="true" resizable="true">
    <form method="post" id="myform">
        <div style="padding:20px">
            <table cellpadding="2px" cellspacing="0" class="form-table">
                <input type="hidden" name="id">
                <tr>
                    <td align="right">机构全称：</td>
                    <td><input name="fullName" class="easyui-validatebox" data-options="required:true"
                               missingMessage="请输入机构简称">
                    </td>
                    <td align="right">机构简称：</td>
                    <td><input name="shorterName" class="easyui-validatebox" data-options="required:true"
                               missingMessage="请输入机构全称"></td>
                </tr>
                <tr>
                    <td align="right">机构类型：</td>
                    <td><input id="type" name="type" class="easyui-combobox"
                               data-options="required:true,valueField:'value',textField:'showmsg',prompt:'==请选择==',panelHeight:'auto'"
                               missingMessage="请维机构类型"
                               validType="comboxValidate['type','请维机构类型']"/>
                    </td>
                    <td align="right">机构地址：</td>
                    <td><input name="address" class="easyui-validatebox" data-options="required:true"
                               missingMessage="请输入机构地址"></td>
                </tr>
                <tr>
                    <td align="right">机构电话：</td>
                    <td><input name="telephoneNumber" class="easyui-validatebox" data-options="required:true"
                               missingMessage="请输入机构电话" validType="phone"></td>
                </tr>
                <tr>
                    <td align="right">上级机构：</td>
                    <td colspan="3">
                        <input id="parentId" name="parentId" style="width: 350px"
                               data-options="required:true,prompt:'==请选择==',panelHeight:'auto'" class="easyui-combotree"
                               missingMessage="请选择上级机构" validType="comtreeValidate['parentId','请选择上级机构']"/></td>
                </tr>
                <tr>
                    <td align="right">机构说明：</td>
                    <td colspan="3">
                        <input class="easyui-textbox" name="description"
                               data-options="multiline:true" style="height:80px;width:350px"/>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</div>
<!--<div style="width: 70%" data-options="region:'center',split:true,border:true,title:'机构列表信息'">
</div>-->
<div style="display: none;">
    <form id="subXls" enctype="multipart/form-data" method="post">
        <input accept=".xls" name="file" type="file"
               id="readXls" onchange="readExcel(this.value);">
    </form>
</div>
<div th:include="common_js :: commJS"></div>
<script type="text/javascript"
        th:src="@{/js/system/organization.js}"></script>
</body>
</html>
